package com.myapp.web.struts2.multipart;

import java.util.EventObject;

public class ProgressChangeEvent extends EventObject {

	private static final long serialVersionUID = -1656797504112421277L;
	
	private EType type ;	

	public enum EType{PROGRESS,COMPLETED,TIMEOUT};
	
	public ProgressChangeEvent(Object source,EType type) {
		super(source);
		this.type = type;
	}

	public EType getType() {
		return type;
	}
	
	public boolean equals(Object obj) {
		 ProgressChangeEvent inst = (ProgressChangeEvent)obj;
		 return inst == null ? false : this.type == inst.type && this.source == inst.source;
    }

	@Override
	public int hashCode() {
		return type.hashCode() + source.hashCode();
	}
}
